package com.sims.action.student;

import org.springframework.beans.factory.annotation.Autowired;

import com.sims.bean.Student;
import com.sims.service.StudentService;
import com.sims.service.TeacherService;
import com.sims.util.ActionEnhanced;
import com.sims.util.Constant;

@SuppressWarnings("serial")
public class StudentLoginAction extends ActionEnhanced{

	private Student student;
	
	@Autowired
	private StudentService studentService;
	
	public Student getStudent() {
		return student;
	}
	public void setStudent(Student student) {
		this.student = student;
	}
	
	@Override
	public String execute() {
		
		result = studentService.studentLogin(student);
		if (result.containsKey(Constant.SUCCESS)) {
			System.out.println("success");
			return SUCCESS;
		}
		return ERROR;
	}
}
